package com.jifen.common;

import com.jifen.constant.ErrorCode;

public class MyException extends RuntimeException {

	private static final long serialVersionUID = -620309716225434348L;
	private Integer code;	// 状态码
	private String msg;		// 描述

	public MyException(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public MyException(ErrorCode errorCode) {
		this.code = errorCode.getCode();
		this.msg = errorCode.getMsg();
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

}
